<?php
/************************************************************************
Class Plugin
----------------------------------------------------------------
PICKCOCMS Project
Company: PICKCO  Co.,Ltd 
Name: Nguyen Hai Nam                                  
Last updated: 06/18/2012
**************************************************************************/
class Pick_Core_Plugin extends Pick_Core_Pick{
	
	public $namePlugin = "";
	public $descriptionPlugin = "";
	
	function Pick_Core_Plugin() {
		parent::Pick_Core_Pick();
	}

	public function run(){
		$this->getContent();
		$this->getVariableForSmarty();
		return $this->loadTemplatePlugin();
	}

	public function getContent(){}
	
	public function loadTemplatePlugin(){
		
		$img_plugin = base_url()."/plugins/".$this->namePlugin."/images/";
		$css_plugin = base_url()."/plugins/".$this->namePlugin."/css/";
		$js_plugin = base_url()."/plugins/".$this->namePlugin."/js/";
		$pathTemplate = ROOT_PATH."/plugins/".$this->namePlugin."/".$this->namePlugin.".temp.html";
		$this->template->assign("img_plugin", $img_plugin);
		$this->template->assign("css_plugin", $css_plugin);
		$this->template->assign("js_plugin", $js_plugin);
		if(file_exists($pathTemplate)){
			return $this->template->fetch($pathTemplate);	
		}else{
			die($this->l("Please check again this path: ").$pathTemplate);	
		}
	}
}
?>